import java.util.Iterator;
import java.util.Set;

public class Test02 {
    public static void main(String[] args) {
        Set<String> set=Set.of("张三","李四","王五");
        for(String s:set){
            System.out.println(s);
        }
        Iterator<String> it=set.iterator();
        while(it.hasNext()){
            String s=it.next();
            System.out.println(s);
        }
    }
}
